 
cd  \\Mac\Home\Desktop\Migrants
use welfare_migrants_original_file, replace
 
save welfare_migrants_active_file, replace   

**************************************************************************** 
 
// Levels of satisfaction  

// Overall satisfaction 
gen SatOverall =Q69_Line1-1 		
replace SatOverall =. if SatOverall <=0  	

// Housing  	
gen SatHousing =Q69_Line5-1	
replace SatHousing =. if SatHousing<=0

// Health care 		
gen SatHealth = Q69_Line6-1	 	
replace SatHealth =. if SatHealth<=0	

// Children's education
gen SatEdu = Q69_Line7-1	// child/children's education 		
replace SatEdu =. if SatEdu<=0	


label define Statlabel 1 "Very unsatisfied" 2 "Unsatisfied" 3 "Neither" 4 "Satisfied" 5 "Very satisfied", replace
label values SatOverall Statlabel 
label values SatHealth Statlabel 
label values SatHousing Statlabel 
label values SatEdu Statlabel  


// Self-evaluated satisfaction of health care 

gen Health=Q72
summarize(Health)  

label values Health Statlabel  
tab(Health) 
 
gen health02=0 
replace health02=1 if Health==2 

gen health03=0 
replace health03=1 if Health==3 

gen health04=0 
replace health04=1 if Health==4 

gen health05=0 
replace health05=1 if Health==5  

****************************************************************************   

// job satisafaction 

generate SatIncome = Q66_Line1	// Job satisfaction. - Current income.
replace SatIncome  =. if SatIncome  ==1 
replace SatIncome  =SatIncome  -1 

generate SatJobOverall= Q66_Line5	//Job satisfaction. - Overall satisfaction.
replace SatJobOverall =. if SatJobOverall ==1 
replace SatJobOverall =SatJobOverall -1

label values SatIncome  Statlabel 
label values SatJobOverall Statlabel 


****************************************************************************   
 
// Personal information 
// gender 

 
gen sex=1   
replace sex=0 if Q1==2  // record male - 1; female - 0. 

// age - by the December 2018 

gen year=Q2_Blank1
 
gen month=Q2_Blank2
 
gen age=2018-year+(12-month)/12  
 
drop year 
drop month 


gen age2=age^2   

// eth -  Ethnicity
// 1 - ethnic minority, 0 - Han. 
 
gen eth=1  
replace eth=0 if Q3==1
* summarize(eth)  

// com  - CPC membership
 
summarize(Q4) 
gen com=1
replace com=0 if Q4==2   // 1- communist party member, 0 - otherwise. 
* summarize(com) 

// edu - Education level  
  
gen edu=1 
replace edu=2 if Q5==2 
replace edu=2 if Q5==3 
replace edu=3 if Q5==4 
replace edu=4 if Q5==5 
replace edu=5 if Q5==6 
replace edu=6 if Q5==7  

* add edu labels 

label define edulabel 1 "Middle school and below" 2 "High school/Secondary vocational college"  3 "College"  /// 
4 "Undergraduate"  5 "Postgraduate" 6 "PhD and postdoc",  replace
 
label values edu edulabel


// self-employment 
 
gen se=0 
replace se=1 if  Q27_Item1==1
replace se=1 if Q27_Item2==1
replace se=1 if Q27_Item3==1 
 
// high tech sector 
 
gen high_tech_sec=0 
replace high_tech_sec=1 if Q29==6 // this corresponds to scientific research and high tech service sector 
 
// Marriage  

gen marr=1 
replace marr=0 if Q35==1 // unmarried 
replace marr=0 if Q35==4 //seperated 
replace marr=0 if Q35==5  //divorced
replace marr=0 if Q35==6  //widowed
 
 
// Monthly personal wage 
 
gen w=Q38_Blank1
gen log_w=log(w)
 

 
// Family size 

gen fz=Q36_Blank1  
summarize(fz)
gen fz_v2=Q36_Blank2 
summarize(fz_v2) 

// Number of children 
gen num_child=Q37_Blank1
summarize(Q37_Blank1) 
 
**************************************************************************** 
// Residency 
// Current residence 

gen res= Q17
 
label define Citylabel 1 "Beijing" 2 "Shanghai" 3 "Guangzhou" , replace
 
label values res Citylabel


// Beijing/Shanghai/Guangzhou dummies 


gen Shanghai_dum=0 
replace Shanghai_dum=1 if res==2 

gen Guangzhou_dum=0 
replace Guangzhou_dum=1 if res==3 

// Being locals of Beijing/Shanghai/Guangzhou  
 
gen local=0 
replace local=1 if Q17==Q18 // matching their hometown with their current 
                            // residency

// Local Hukou 

gen BSG_hukou=0 
replace BSG_hukou=1 if Q20<=3
 

label define BSGlabel 1 "BSG Hukou holder" 0 "otherwise", replace
label values BSG_hukou BSGlabel


// Naturalized migrants - these are the migrants with BSG Hukou, but are not 
// originally from BSG. 
 
gen naturalized_migrants=BSG_hukou  
replace naturalized_migrants=0 if Q17==Q18 
 

// Total migrants = naturalized migrants + nonlocal 
gen total_migrants=0 
replace total_migrants=1 if naturalized_migrants==1  
replace total_migrants=1 if BSG_hukou==0

// Duration of stay in the current city by December 2018 
 
gen year=real(Q22_Blank1)
summarize(year)

gen month= real(Q22_Blank2)
summarize(month)

gen dur=2018-year+(12-month)/12  
drop year 
drop month 

// Hukou status 
 
gen agri_hk_birth=1 
replace agri_hk_birth=0 if Q24==3 
 
gen agri_hk_current=0 
replace agri_hk_current=1  if Q24==1  
 
* adding labels 
 
label define Hklabel 1 "Agricultural Hukou (Current)" 0 "Non-agricultural Hukou (Current)", replace
label values agri_hk_current Hklabel 
 
tab(agri_hk_current)

label define Hklabel_v2 1 "Agricultural Hukou (Birth)" 0 "Non-agricultural Hukou (Birth)", replace
label values agri_hk_birth Hklabel_v2
 
tab(agri_hk_current)
tab(agri_hk_birth)
 


****************************************************************************   
// Social endowment - proxied by social/economic attributes of their parents 

  
gen cpc_father=0 
replace cpc_father=1 if Q9==1 
replace cpc_father=1 if Q9==3 



gen cpc_mother=0 
replace cpc_mother=1 if Q9==2 
replace cpc_mother=1 if Q9==3 
 
 

// Information on father's side 
// Father's education 
 
gen edu_father=1 
replace edu_father=2 if Q11==2 
replace edu_father=2 if Q11==3 
replace edu_father=3 if Q11==4 
replace edu_father=4 if Q11==5 
replace edu_father=5 if Q11==6 
replace edu_father=6 if Q11==7 
label values edu_father edulabel 

// Senior status of the father 
 
 gen senior_father =0 
 replace senior_father=1 if Q12_Item1==1 // father being senior management 
 replace senior_father=1 if Q12_Item6==1  // father holding senior professional title
 
 
// Father's income 
 
gen w_father = Q13_Blank1
gen log_w_father=log(w_father)
 
 
 
****************************************************************************   

// Information on mother's side 
 
// Mother's education 

gen edu_mother=1 
replace edu_mother=2 if Q14==2 
replace edu_mother=2 if Q14==3 
replace edu_mother=3 if Q14==4 
replace edu_mother=4 if Q14==5 
replace edu_mother=5 if Q14==6 
replace edu_mother=6 if Q14==7 
 
 
label values edu_mother edulabel

 // Senior status of the mother
 
 gen senior_mother =0 
 replace senior_mother=1 if Q15_Item1==1 // motheris being senior management 
 replace senior_mother=1 if Q15_Item6==1  // mother holding senior professional title
 

 // Mother's wage

 gen w_mother= Q16_Blank1
 gen log_w_mother=log(w_mother) 
**************************************************************************** 
 

// children's education 
 
gen SatEdu_v2=SatEdu 
replace SatEdu_v2=. if num_child<=0  // only consider those who have children 


// recode into levels of satisfaction into binary measures 

 gen SatOverall_binary = 0 
  
replace SatOverall_binary=1 if SatOverall==4 
replace SatOverall_binary=1 if SatOverall==5  


 gen SatHousing_binary = 0 
  
replace SatHousing_binary=1 if SatHousing==4 
replace SatHousing_binary=1 if SatHousing==5  

 gen SatHealth_binary = 0 
 
replace SatHealth_binary=1 if SatHealth==4 
replace SatHealth_binary=1 if SatHealth==5  

 gen SatEdu_binary = 0 
 

replace SatEdu_binary=1 if SatEdu==4 
replace SatEdu_binary=1 if SatEdu==5  


 gen SatJobOverall_binary = 0 
 

replace SatJobOverall_binary=1 if SatJobOverall==4 
replace SatJobOverall_binary=1 if SatJobOverall==5  

 gen SatIncome_binary = 0 
 

replace SatIncome_binary=1 if SatIncome==4 
replace SatIncome_binary=1 if SatIncome==5  



save welfare_migrants_active_file, replace   // saving data file 
  
**************************************************************************** 
    
 
// summary statistics 


estpost summarize  SatOverall SatHealth SatHousing SatEdu_v2 SatJobOverall SatIncome Health /// satisfaction levels 
w high_tech_sec sex age  com eth marr edu dur /// personal attributes 
cpc_father cpc_mother  w_father  w_mother senior_father senior_mother edu_father edu_mother ///social endowment
local agri_hk_birth BSG_hukou agri_hk_current   
esttab, cells("count mean sd min max") noobs, using SummaryStatistics.rtf, replace  


// multicollinearity test 

// overall satisfaction with life 
 
collin SatOverall   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  

    gologit2 SatOverall   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother   ,   pl sto(oprobit) link(p)

  

 gologit2 SatOverall   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats 
 
 // overall satisfaction with housing 
 
  
collin SatHousing  BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  

gologit2 SatHousing   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother   ,   pl sto(oprobit) link(p)


 gologit2 SatHousing   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats 
 
 
 // satisfaction with  health  - fine for ordered probit 
 
 collin SatHealth  BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  

gologit2 SatHealth   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother   ,   pl sto(oprobit) link(p)


 gologit2 SatHealth   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats  
 
 gologit2 SatHealth   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
    ,   pl sto(oprobit) link(p)


 gologit2 SatHealth   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats  

 
 
gologit2 SatHealth   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health   ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother   ,   pl sto(oprobit) link(p)


 gologit2 SatHealth   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health    ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother , npl sto(goprobit) link(p)
  
 
 lrtest oprobit goprobit, stats  
 
preserve 
tempfile withchild    
keep if num_child>=1 
save "withchild", replace  
  
collin SatEdu   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  
 
 
  collin SatEdu   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  

gologit2 SatEdu   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother   ,   pl sto(oprobit) link(p)


 gologit2 SatEdu   BSG_hukou agri_hk_current agri_hk_birth   Shanghai_dum Guangzhou_dum Health  log_w sex age  com eth marr edu dur ///
 cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats  
 
 
restore 






**************************************************************************** 
  // subsamples 
  
 
preserve 
tempfile TotalMigrants Otherwise 
keep if total_migrants ==1  
save "TotalMigrants", replace   
 
restore 




preserve 
tempfile Indigenous  NonIndigenous
keep if local==1  
save "Indigenous", replace   
 
restore  

// summary of SatOverall SatHealth SatHousing SatEdu Health for those who do not possess a vital local hukou 

preserve 
tempfile NoLocalHukou Otherwise 
keep if BSG_hukou ==0  
save "NoLocalHukou", replace   
 
restore  



// main analysis  - use the subsample of migrants 
 use TotalMigrants, replace 
 

 
// proposition 1 - version 20190922   

//  (i) an individual with a higher value of home locality residency 
// (reflected in a larger H_(ji,o)) generally has a higher level of satisfaction
//  with public goods and services Γ in the megacity. 
 

probit SatOverall_binary   BSG_hukou agri_hk_current Shanghai_dum Guangzhou_dum Health  , vce(robust) 
est sto m1 
 
probit SatOverall_binary  BSG_hukou agri_hk_current Shanghai_dum Guangzhou_dum  Health  log_w sex age com eth marr edu dur   , vce(robust) 
est sto m1_v2 
 
probit SatHousing_binary BSG_hukou agri_hk_current  Shanghai_dum Guangzhou_dum Health  , vce(robust) 
est sto m2 

probit SatHousing_binary BSG_hukou agri_hk_current   Shanghai_dum Guangzhou_dum Health log_w sex age com eth marr edu dur    , vce(robust) 
est sto m2_v2

probit SatHealth_binary  BSG_hukou agri_hk_current Health  Shanghai_dum Guangzhou_dum, vce(robust) 
est sto m3 


probit SatHealth_binary BSG_hukou agri_hk_current  Shanghai_dum Guangzhou_dum Health log_w sex age com eth marr edu dur    , vce(robust) 
est sto m3_v2 


preserve 
tempfile withchild    
keep if num_child>=1 
save "withchild", replace      // to look at children's education, we need to look into the cohort with children   


probit SatEdu_binary BSG_hukou agri_hk_current   Shanghai_dum Guangzhou_dum Health  , vce(robust) 
est sto m4 

probit SatEdu_binary BSG_hukou agri_hk_current  Shanghai_dum Guangzhou_dum Health  log_w sex age com eth marr edu dur   , vce(robust) 
est sto m4_v2
restore 
 
esttab   m1 m1_v2 m2 m2_v2 m3 m3_v2 m4  m4_v2, star(* 0.1 ** 0.05 *** 0.01) scalars(N aic ),  using Prop1_i.rtf, replace  

**************************************     

// proposition 1 - version 20190922   

//  (ii) an individual with higher social endowment (reflected in a larger S) generally
//  has a higher level of satisfaction with public goods and services Γ in the megacity. 
 
probit SatOverall_binary agri_hk_birth cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother , vce(robust)  // social endowment 
est sto m1 

probit SatOverall_binary agri_hk_birth cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother ///
log_w sex age com eth marr edu dur  Health   Shanghai_dum Guangzhou_dum , vce(robust)  // personal attributes 
est sto m1_v2  
 
probit SatHousing_binary agri_hk_birth cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother , vce(robust)  // social endowment 
est sto m2

probit SatHousing_binary agri_hk_birth cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  ///
log_w sex age com eth marr edu dur  Health   Shanghai_dum Guangzhou_dum, vce(robust)  // personal attributes 
est sto m2_v2 
 
 
probit SatHealth_binary agri_hk_birth cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  Shanghai_dum Guangzhou_dum, vce(robust)  // social endowment 
est sto m3 

probit SatHealth_binary agri_hk_birth cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  ///
log_w sex age com eth marr edu dur  Health   Shanghai_dum Guangzhou_dum, vce(robust)  // personal attributes 
est sto m3_v2 
 

 
 

preserve 
tempfile withchild    
keep if num_child>=1 
save "withchild", replace          // to look at children's education, we need to look into the cohort with children   


probit SatEdu_binary agri_hk_birth  cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  Shanghai_dum Guangzhou_dum, vce(robust)  // social endowment 
est sto m4

probit SatEdu_binary  agri_hk_birth cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother ///
log_w sex age com eth marr edu dur  Health   Shanghai_dum Guangzhou_dum, vce(robust)  // personal attributes 
est sto m4_v2 
 
restore 

esttab  m1 m1_v2 m2 m2_v2 m3 m3_v2 m4  m4_v2 , star(* 0.1 ** 0.05 *** 0.01) scalars(N aic ),  using Prop1_ii.rtf, replace  

**************************************     

// Proposition 2 A trade-off exists between the value of a megacity residency H ̅ and unit wage (w) at a given utility level. A migrant can, therefore, 
// bear a lower unit wage in the megacity if he/she can attain a higher level of utility through residing in the megacity.   

// Proposition 3 Ceteris paribus, a migrant’s utility (u_i) increases with the technology level of the sector (A_j) which employs him/her. 
 
 
 
// Entire sample 
/* 
 gologit2 SatOverall   agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur   ,   pl sto(oprobit) link(p)
  

 gologit2 SatOverall   agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur   , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats 


 gologit2 SatJobOverall  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur   ,   pl sto(oprobit) link(p)
  

 gologit2 SatJobOverall agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur   , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats 
 
 gologit2 SatIncome  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur   ,   pl sto(oprobit) link(p)
  

 gologit2 SatIncome agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur   , npl sto(goprobit) link(p)
 
 
 lrtest oprobit goprobit, stats */ 
 



use welfare_migrants_active_file  

probit SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur  

est sto m1_table5    

probit SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  /// 
log_w sex age com eth marr edu dur  

est sto m1_table5_v2     
 
probit SatOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m1_table6   

probit  SatJobOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m1_table6_v2   

probit  SatIncome_binary  high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m1_table6_v3   
 
// Unnaturalized migrants 

use NoLocalHukou

probit SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur  

est sto m2_table5     

probit SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  ///
cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  /// 
log_w sex age com eth marr edu dur  
est sto m2_table5_v2     

probit SatOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m2_table6   

probit  SatJobOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m2_table6_v2   

probit  SatIncome_binary   high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m2_table6_v3    


// Total migrants 

use TotalMigrants

/*
collin SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur  
  

collin SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  /// 
log_w sex age com eth marr edu dur  
   

collin SatOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
 

collin  SatJobOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
 
 
collin  SatIncome_binary   high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
 */ 





probit SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
log_w sex age com eth marr edu dur  
est sto  m3_table5     

probit SatOverall_binary  agri_hk_current Health   Shanghai_dum Guangzhou_dum  /// 
cpc_father cpc_mother log_w_father log_w_mother senior_father senior_mother edu_father edu_mother  /// 
log_w sex age com eth marr edu dur  
est sto  m3_table5_v2     

probit SatOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m3_table6   

probit  SatJobOverall_binary high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m3_table6_v2   
 
 probit  SatIncome_binary   high_tech_sec agri_hk_current Health ///
log_w sex age com eth marr edu dur  
est sto m3_table6_v3   

esttab  m1_table5    m2_table5    m3_table5   m1_table5_v2    m2_table5_v2    m3_table5_v2  /// 
 , star(* 0.1 ** 0.05 *** 0.01) scalars(N aic ),  using Prop2.rtf, replace  


/* esttab  m1_table6    m2_table6    m3_table6   m1_table6_v2    m2_table6_v2    m3_table6_v2  /// 
m1_table6_v3    m2_table6_v3    m3_table6_v3   ///  */ 

esttab  m1_table6    m2_table6    m3_table6   m1_table6_v2    m2_table6_v2    m3_table6_v2 ///
 , star(* 0.1 ** 0.05 *** 0.01) scalars(N aic ),  using Prop3.rtf, replace  

**************************************     
use welfare_migrants_active_file  


probit  high_tech_sec sex age com eth marr  edu    , vce(robust) // personal information
est sto m1

probit  high_tech_sec sex age com eth marr edu naturalized_migrants agri_hk_current   , vce(robust)  // add hukou est sto m2
 est sto m2
probit  high_tech_sec sex age com eth marr edu naturalized_migrants agri_hk_birth, vce(robust)  // add hukou 
est sto m3
 
probit  high_tech_sec sex  com   edu naturalized_migrants   , vce(robust)  // add hukou 
est sto m4
esttab  m1 m2 m3 m4  , star(* 0.1 ** 0.05 *** 0.01)  scalars(N aic ),  using Prop3_ii.rtf, replace 



/*
collin high_tech_sec sex age com eth marr  edu 

collin high_tech_sec sex age com eth marr edu naturalized_migrants agri_hk_current

collin high_tech_sec sex age com eth marr edu naturalized_migrants agri_hk_birth

collin high_tech_sec sex  com   edu naturalized_migrants */
